<template>
  <div>
    <div class="asidemenu">
      <el-menu
        @select="sel"
        active-text-color="#74BAEB"
        default-active="user-management"
        background-color="#304156"
        text-color="white"
      >
        <el-menu-item index="user-management">
          <span slot="title">用户权限管理</span>
        </el-menu-item>
        <el-menu-item index="diary-management">
          <span slot="title">日志管理</span>
        </el-menu-item>
      </el-menu>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  methods: {
    sel(e) {
      switch (e) {
        case "user-management":
          this.$router
            .push({
              name: "user-management",
              params: {
                value: "user-management",
              },
            })
            .catch((err) => {
              console.log(err);
            });
          break;
        case "diary-management":
          this.$router
            .push({
              name: "diary-management",
              params: {
                value: "diary-management",
              },
            })
            .catch((err) => {
              console.log(err);
            });
          break;

        default:
          break;
      }
    },
  },
  created() {
    this.$router
      .push({
        name: "user-management",
        params: {
          value: "user-management",
        },
      })
      .catch((err) => {
        console.log(err);
      });
  },
};
</script>

<style >
</style>